package com.mfoyou.agent.web.utils.wx;

import org.mfoyou.agent.utils.common.StringUtils;

public class WxWithDrawData {

    private String mch_appid;
    private String mchid;
    private String nonce_str;
    private String sign = "";
    private String openid;
    private String check_name;
    private String partner_trade_no;
    private String re_user_name;
    private Integer amount;
    private String desc;
    private String spbill_create_ip;

    public WxWithDrawData(String mch_appid, String mchid, String openid,
                          String partner_trade_no, String re_user_name, Integer amount, String desc, String sec) {
        this.mch_appid = mch_appid;
        this.mchid = mchid;
        this.nonce_str = StringUtils.getRandomStringByLength(32);
        this.openid = openid;
        this.check_name = "FORCE_CHECK";
        this.partner_trade_no = partner_trade_no;
        this.re_user_name = re_user_name;
        this.amount = amount;
        this.desc = desc;
        this.spbill_create_ip = "192.168.0.1";
        try {
            this.sign = StringUtils.getSign(this, sec);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }
    }

    public String getMch_appid() {
        return mch_appid;
    }

    public void setMch_appid(String mch_appid) {
        this.mch_appid = mch_appid;
    }

    public String getMch_id() {
        return mchid;
    }

    public void setMch_id(String mch_id) {
        this.mchid = mch_id;
    }

    public String getNonce_str() {
        return nonce_str;
    }

    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getOpenId() {
        return openid;
    }

    public void setOpenId(String openid) {
        this.openid = openid;
    }

    public String getCheck_name() {
        return check_name;
    }

    public void setCheck_name(String check_name) {
        this.check_name = check_name;
    }

    public String getPartner_trade_no() {
        return partner_trade_no;
    }

    public void setPartner_trade_no(String partner_trade_no) {
        this.partner_trade_no = partner_trade_no;
    }

    public String getRe_user_name() {
        return re_user_name;
    }

    public void setRe_user_name(String re_user_name) {
        this.re_user_name = re_user_name;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getSpbill_create_ip() {
        return spbill_create_ip;
    }

    public void setSpbill_create_ip(String spbill_create_ip) {
        this.spbill_create_ip = spbill_create_ip;
    }

}
